EW

Syntax: EW file *[,{filex | #chx}]* [;cmd$]
Location: Toolkit II, THOR XVI

This command causes the given file (which must be an executable program) to be executed.  If the drivename is not given, or the file cannot be found on the given device, EW will load the first file from the default program directory (see PROGD$), with subsequent programs being loaded from the default data directory (see DATAD$).

The calling program will be stopped whilst the new job is running (ie. the new job cannot multitask with the calling program). If you supply any channels (which must already be open in the calling program) or filenames as parameters, these form channels which can be accessed by the job.

Further, you can pass a command string (cmd$) to the program specifying what the executed job should do. It depends on the job what cmd$ should look like and also how you will access the given string. The command string must appear as the last parameter for the command. The command string can be explicit strings and names as well as expressions. However, variables must be converted into expressions, for example by:

EW 'flp1_xchange';(dataspace)

Example:
EW QED;"flp1_readme_txt"
The editor will be started from the default program directory and told to load the file readme_txt.

MINERVA NOTES:
As from v1.93+, MultiBASICs can be started up with the command:

EW pipep *[,{filex | #chx}]* [;cmd$]

prior to this version, you needed to load the file Multib_exe contained on the disk supplied with Minerva and use the command:

EW flp1_Multib_exe *[,{filex | #chx}]* [;cmd$]

How any supplied channels are dealt with is slightly different to all other implementations.  Its effect depends on how many channels are passed:

No channels passed      MultiBASIC started with a
                        single small window which
                        is the same for #0 and #1
One channel passed      This becomes both #0 and #1
Two channels passed     These become #0 and #1
                        respectively.

Three+ channels passed: The first two become #0
                        and #1 respectively, then any
                        additional ones become #3
                        onwards.

Minerva MultiBASICs also treat any command string passed to them in a special way:

(1) If the last character of the command string is an exclamation mark (!), then the MultiBASIC is started up with the original keywords built into the ROM, and any which had been linked into SuperBASIC subsequently will not be available to that MultiBASIC.  This character is then removed from the command string before it can be read by the MultiBASIC.

(2) If the command string contains the greater than sign (>), then anything which appears before that character in the string, is opened as an input command chau to run a MultiBASIC program in the background) and then all characters up to and including the greater than character are deleted from the command string before it can be read by the MultiBASIC.

EW pipep,flp1_test_txt,#3;'flp1_UC_bas>'


SMS NOTE:
SMS allows EW and EX to run basic programs in the background, as an SBASIC job.  For example, using the Minerva example program above, this could be used with the line:

EW flp1_UC_bas,flp1_test_txt,#3

CROSS-REFERENCE:
For further information see EX.
SBASIC allows you to set up several SBASIC jobs under SMS.
